package cn.tedu.sp02.Service;

import cn.tedu.sp1.Service.ItemService;

import cn.tedu.sp1.entity.Item;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;

@Service
@Slf4j
public class ItemServiceImpl implements ItemService {

    @Override
    public List<Item> getItems(String orderId) {
        List<Item> list = new ArrayList<>();
        list.add(new Item(1,"1",1));
        list.add(new Item(1,"2",2));
        list.add(new Item(3,"3",3));
        return list;
    }

    @Override
    public void decreaseNumber(List<Item> items) {
        for (Item item : items){
            System.out.println(".info()-1;");
        }
    }
}
